<?php
//$Id: SudingkeAPI.php 522 2012-08-15 09:22:00Z tomqin@gmail.com $

class SudingkeAPI extends ISudingkeAPI {

    public $version = 'v1.0';

    public function onWaimaiList(){
        $table = Db::getTable('biz_dish_cat');

        $table->where(array('id'=> 10, 'sex'=>100))
              ->where(array('age'=>5))
              ->where("Or name Like '%test%'")
              ->delete(6);

        $table->where(array('id'=> 10, 'sex'=>100))
              ->where("Or name Like '%test%'")
              ->update(array('dish_cat'=>6, 'shop_id' => 1005, 'cat_name' => 'name'), 2);

        $d = $table->field(array('cat_name', 'shop_id', 'cat_name'))->select(8);

        $method = Core::getApp()->getActionMethod();
        $this->retMessage(true, 'helloworld', array('data' => $d));
    }
}
?>